package com.qk.management.mapper;

import com.qk.entity.Activity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @文件名: ActivityMapper
 * @作者: DX
 * @创建日期: 2025/10/9
 * @描述:
 */
@Mapper
public interface ActivityMapper {
    List<Activity> pageResult(@Param("channel") Integer channel,@Param("type") Integer type);

    @Delete("delete from activity where id = #{id}")
    void delete(Integer id);

    void add(Activity activity);

    @Select("select * from activity where id = #{id}")
    Activity getById(Integer id);

    void update(Activity activity);

    @Select("select * from activity where type = #{type}")
    List<Activity> listByType(Integer type);
}
